3.5.54 \(\int \frac {(c+d \sin (e+f x))^3}{a+a \sin (e+f x)} \, dx\) [454]

Optimal. Leaf size=121 \[ \frac {3 d \left (2 c^2-2 c d+d^2\right ) x}{2 a}+\frac {2 d \left (c^2-3 c d+d^2\right ) \cos (e+f x)}{a f}+\frac {(2 c-3 d) d^2 \cos (e+f x) \sin (e+f x)}{2 a f}-\frac {(c-d) \cos (e+f x) (c+d \sin (e+f x))^2}{f (a+a \sin (e+f x))} \]

[Out]

3/2*d*(2*c^2-2*c*d+d^2)*x/a+2*d*(c^2-3*c*d+d^2)*cos(f*x+e)/a/f+1/2*(2*c-3*d)*d^2*cos(f*x+e)*sin(f*x+e)/a/f-(c-
d)*cos(f*x+e)*(c+d*sin(f*x+e))^2/f/(a+a*sin(f*x+e))

________________________________________________________________________________________

Rubi [A]
time = 0.08, antiderivative size = 121, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.080, Rules used = {2846, 2813} \begin {gather*} \frac {2 d \left (c^2-3 c d+d^2\right ) \cos (e+f x)}{a f}+\frac {3 d x \left (2 c^2-2 c d+d^2\right )}{2 a}+\frac {d^2 (2 c-3 d) \sin (e+f x) \cos (e+f x)}{2 a f}-\frac {(c-d) \cos (e+f x) (c+d \sin (e+f x))^2}{f (a \sin (e+f x)+a)} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(c + d*Sin[e + f*x])^3/(a + a*Sin[e + f*x]),x]

[Out]

(3*d*(2*c^2 - 2*c*d + d^2)*x)/(2*a) + (2*d*(c^2 - 3*c*d + d^2)*Cos[e + f*x])/(a*f) + ((2*c - 3*d)*d^2*Cos[e +
f*x]*Sin[e + f*x])/(2*a*f) - ((c - d)*Cos[e + f*x]*(c + d*Sin[e + f*x])^2)/(f*(a + a*Sin[e + f*x]))

Rule 2813

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(2*a*c +
 b*d)*(x/2), x] + (-Simp[(b*c + a*d)*(Cos[e + f*x]/f), x] - Simp[b*d*Cos[e + f*x]*(Sin[e + f*x]/(2*f)), x]) /;
 FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0]

Rule 2846

Int[((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_)/((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(-(
b*c - a*d))*Cos[e + f*x]*((c + d*Sin[e + f*x])^(n - 1)/(a*f*(a + b*Sin[e + f*x]))), x] - Dist[d/(a*b), Int[(c
+ d*Sin[e + f*x])^(n - 2)*Simp[b*d*(n - 1) - a*c*n + (b*c*(n - 1) - a*d*n)*Sin[e + f*x], x], x], x] /; FreeQ[{
a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && GtQ[n, 1] && (IntegerQ
[2*n] || EqQ[c, 0])

Rubi steps

\begin {align*} \int \frac {(c+d \sin (e+f x))^3}{a+a \sin (e+f x)} \, dx &=-\frac {(c-d) \cos (e+f x) (c+d \sin (e+f x))^2}{f (a+a \sin (e+f x))}-\frac {d \int (-a (3 c-2 d)+a (2 c-3 d) \sin (e+f x)) (c+d \sin (e+f x)) \, dx}{a^2}\\ &=\frac {3 d \left (2 c^2-2 c d+d^2\right ) x}{2 a}+\frac {2 d \left (c^2-3 c d+d^2\right ) \cos (e+f x)}{a f}+\frac {(2 c-3 d) d^2 \cos (e+f x) \sin (e+f x)}{2 a f}-\frac {(c-d) \cos (e+f x) (c+d \sin (e+f x))^2}{f (a+a \sin (e+f x))}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.39, size = 192, normalized size = 1.59 \begin {gather*} \frac {\left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right ) \left (d \cos \left (\frac {1}{2} (e+f x)\right ) \left (6 \left (2 c^2-2 c d+d^2\right ) (e+f x)-4 (3 c-d) d \cos (e+f x)-d^2 \sin (2 (e+f x))\right )+\sin \left (\frac {1}{2} (e+f x)\right ) \left (2 \left (4 c^3+6 c^2 d (-2+e+f x)-6 c d^2 (-2+e+f x)+d^3 (-4+3 e+3 f x)\right )-4 (3 c-d) d^2 \cos (e+f x)-d^3 \sin (2 (e+f x))\right )\right )}{4 a f (1+\sin (e+f x))} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(c + d*Sin[e + f*x])^3/(a + a*Sin[e + f*x]),x]

[Out]

((Cos[(e + f*x)/2] + Sin[(e + f*x)/2])*(d*Cos[(e + f*x)/2]*(6*(2*c^2 - 2*c*d + d^2)*(e + f*x) - 4*(3*c - d)*d*
Cos[e + f*x] - d^2*Sin[2*(e + f*x)]) + Sin[(e + f*x)/2]*(2*(4*c^3 + 6*c^2*d*(-2 + e + f*x) - 6*c*d^2*(-2 + e +
 f*x) + d^3*(-4 + 3*e + 3*f*x)) - 4*(3*c - d)*d^2*Cos[e + f*x] - d^3*Sin[2*(e + f*x)])))/(4*a*f*(1 + Sin[e + f
*x]))

________________________________________________________________________________________

Maple [A]
time = 0.32, size = 148, normalized size = 1.22

method result size
derivativedivides \(\frac {2 d \left (\frac {\frac {d^{2} \left (\tan ^{3}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2}+\left (-3 c d +d^{2}\right ) \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )-\frac {d^{2} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{2}-3 c d +d^{2}}{\left (1+\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )^{2}}+\frac {3 \left (2 c^{2}-2 c d +d^{2}\right ) \arctan \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2}\right )-\frac {2 \left (c^{3}-3 c^{2} d +3 c \,d^{2}-d^{3}\right )}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1}}{a f}\) \(148\)
default \(\frac {2 d \left (\frac {\frac {d^{2} \left (\tan ^{3}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2}+\left (-3 c d +d^{2}\right ) \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )-\frac {d^{2} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{2}-3 c d +d^{2}}{\left (1+\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )^{2}}+\frac {3 \left (2 c^{2}-2 c d +d^{2}\right ) \arctan \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2}\right )-\frac {2 \left (c^{3}-3 c^{2} d +3 c \,d^{2}-d^{3}\right )}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1}}{a f}\) \(148\)
risch \(\frac {3 d x \,c^{2}}{a}-\frac {3 d^{2} x c}{a}+\frac {3 d^{3} x}{2 a}-\frac {3 d^{2} {\mathrm e}^{i \left (f x +e \right )} c}{2 a f}+\frac {d^{3} {\mathrm e}^{i \left (f x +e \right )}}{2 a f}-\frac {3 d^{2} {\mathrm e}^{-i \left (f x +e \right )} c}{2 a f}+\frac {d^{3} {\mathrm e}^{-i \left (f x +e \right )}}{2 a f}-\frac {2 c^{3}}{f a \left ({\mathrm e}^{i \left (f x +e \right )}+i\right )}+\frac {6 c^{2} d}{f a \left ({\mathrm e}^{i \left (f x +e \right )}+i\right )}-\frac {6 c \,d^{2}}{f a \left ({\mathrm e}^{i \left (f x +e \right )}+i\right )}+\frac {2 d^{3}}{f a \left ({\mathrm e}^{i \left (f x +e \right )}+i\right )}-\frac {d^{3} \sin \left (2 f x +2 e \right )}{4 a f}\) \(235\)
norman \(\frac {\frac {-6 c \,d^{2}+d^{3}}{a f}+\frac {\left (-6 c \,d^{2}-d^{3}\right ) \left (\tan ^{4}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{a f}+\frac {\left (2 c^{3}-6 c^{2} d -2 d^{3}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{a f}+\frac {\left (2 c^{3}-6 c^{2} d +6 c \,d^{2}-3 d^{3}\right ) \left (\tan ^{7}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{a f}+\frac {\left (6 c^{3}-18 c^{2} d +6 c \,d^{2}-5 d^{3}\right ) \left (\tan ^{3}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{a f}+\frac {3 d \left (2 c^{2}-2 c d +d^{2}\right ) x}{2 a}-\frac {12 c \,d^{2} \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{a f}+\frac {3 \left (2 c^{3}-6 c^{2} d +4 c \,d^{2}-2 d^{3}\right ) \left (\tan ^{5}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{a f}+\frac {3 d \left (2 c^{2}-2 c d +d^{2}\right ) x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{2 a}+\frac {9 d \left (2 c^{2}-2 c d +d^{2}\right ) x \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2 a}+\frac {9 d \left (2 c^{2}-2 c d +d^{2}\right ) x \left (\tan ^{3}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2 a}+\frac {9 d \left (2 c^{2}-2 c d +d^{2}\right ) x \left (\tan ^{4}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2 a}+\frac {9 d \left (2 c^{2}-2 c d +d^{2}\right ) x \left (\tan ^{5}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2 a}+\frac {3 d \left (2 c^{2}-2 c d +d^{2}\right ) x \left (\tan ^{6}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2 a}+\frac {3 d \left (2 c^{2}-2 c d +d^{2}\right ) x \left (\tan ^{7}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2 a}}{\left (1+\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )^{3} \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )}\) \(493\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((c+d*sin(f*x+e))^3/(a+a*sin(f*x+e)),x,method=_RETURNVERBOSE)

[Out]

2/f/a*(d*((1/2*d^2*tan(1/2*f*x+1/2*e)^3+(-3*c*d+d^2)*tan(1/2*f*x+1/2*e)^2-1/2*d^2*tan(1/2*f*x+1/2*e)-3*c*d+d^2
)/(1+tan(1/2*f*x+1/2*e)^2)^2+3/2*(2*c^2-2*c*d+d^2)*arctan(tan(1/2*f*x+1/2*e)))-(c^3-3*c^2*d+3*c*d^2-d^3)/(tan(
1/2*f*x+1/2*e)+1))

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 463 vs. \(2 (123) = 246\).
time = 0.53, size = 463, normalized size = 3.83 \begin {gather*} \frac {d^{3} {\left (\frac {\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + \frac {5 \, \sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + \frac {3 \, \sin \left (f x + e\right )^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}} + \frac {3 \, \sin \left (f x + e\right )^{4}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{4}} + 4}{a + \frac {a \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + \frac {2 \, a \sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + \frac {2 \, a \sin \left (f x + e\right )^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}} + \frac {a \sin \left (f x + e\right )^{4}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{4}} + \frac {a \sin \left (f x + e\right )^{5}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{5}}} + \frac {3 \, \arctan \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}\right )}{a}\right )} - 6 \, c d^{2} {\left (\frac {\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + \frac {\sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + 2}{a + \frac {a \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + \frac {a \sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + \frac {a \sin \left (f x + e\right )^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}}} + \frac {\arctan \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}\right )}{a}\right )} + 6 \, c^{2} d {\left (\frac {\arctan \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}\right )}{a} + \frac {1}{a + \frac {a \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}}\right )} - \frac {2 \, c^{3}}{a + \frac {a \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}}}{f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c+d*sin(f*x+e))^3/(a+a*sin(f*x+e)),x, algorithm="maxima")

[Out]

(d^3*((sin(f*x + e)/(cos(f*x + e) + 1) + 5*sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + 3*sin(f*x + e)^3/(cos(f*x + e
) + 1)^3 + 3*sin(f*x + e)^4/(cos(f*x + e) + 1)^4 + 4)/(a + a*sin(f*x + e)/(cos(f*x + e) + 1) + 2*a*sin(f*x + e
)^2/(cos(f*x + e) + 1)^2 + 2*a*sin(f*x + e)^3/(cos(f*x + e) + 1)^3 + a*sin(f*x + e)^4/(cos(f*x + e) + 1)^4 + a
*sin(f*x + e)^5/(cos(f*x + e) + 1)^5) + 3*arctan(sin(f*x + e)/(cos(f*x + e) + 1))/a) - 6*c*d^2*((sin(f*x + e)/
(cos(f*x + e) + 1) + sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + 2)/(a + a*sin(f*x + e)/(cos(f*x + e) + 1) + a*sin(f
*x + e)^2/(cos(f*x + e) + 1)^2 + a*sin(f*x + e)^3/(cos(f*x + e) + 1)^3) + arctan(sin(f*x + e)/(cos(f*x + e) +
1))/a) + 6*c^2*d*(arctan(sin(f*x + e)/(cos(f*x + e) + 1))/a + 1/(a + a*sin(f*x + e)/(cos(f*x + e) + 1))) - 2*c
^3/(a + a*sin(f*x + e)/(cos(f*x + e) + 1)))/f

________________________________________________________________________________________

Fricas [A]
time = 0.34, size = 244, normalized size = 2.02 \begin {gather*} \frac {d^{3} \cos \left (f x + e\right )^{3} - 2 \, c^{3} + 6 \, c^{2} d - 6 \, c d^{2} + 2 \, d^{3} + 3 \, {\left (2 \, c^{2} d - 2 \, c d^{2} + d^{3}\right )} f x - 2 \, {\left (3 \, c d^{2} - d^{3}\right )} \cos \left (f x + e\right )^{2} - {\left (2 \, c^{3} - 6 \, c^{2} d + 12 \, c d^{2} - 3 \, d^{3} - 3 \, {\left (2 \, c^{2} d - 2 \, c d^{2} + d^{3}\right )} f x\right )} \cos \left (f x + e\right ) - {\left (d^{3} \cos \left (f x + e\right )^{2} - 2 \, c^{3} + 6 \, c^{2} d - 6 \, c d^{2} + 2 \, d^{3} - 3 \, {\left (2 \, c^{2} d - 2 \, c d^{2} + d^{3}\right )} f x + {\left (6 \, c d^{2} - d^{3}\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{2 \, {\left (a f \cos \left (f x + e\right ) + a f \sin \left (f x + e\right ) + a f\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c+d*sin(f*x+e))^3/(a+a*sin(f*x+e)),x, algorithm="fricas")

[Out]

1/2*(d^3*cos(f*x + e)^3 - 2*c^3 + 6*c^2*d - 6*c*d^2 + 2*d^3 + 3*(2*c^2*d - 2*c*d^2 + d^3)*f*x - 2*(3*c*d^2 - d
^3)*cos(f*x + e)^2 - (2*c^3 - 6*c^2*d + 12*c*d^2 - 3*d^3 - 3*(2*c^2*d - 2*c*d^2 + d^3)*f*x)*cos(f*x + e) - (d^
3*cos(f*x + e)^2 - 2*c^3 + 6*c^2*d - 6*c*d^2 + 2*d^3 - 3*(2*c^2*d - 2*c*d^2 + d^3)*f*x + (6*c*d^2 - d^3)*cos(f
*x + e))*sin(f*x + e))/(a*f*cos(f*x + e) + a*f*sin(f*x + e) + a*f)

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 3602 vs. \(2 (107) = 214\).
time = 2.50, size = 3602, normalized size = 29.77 \begin {gather*} \text {Too large to display} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c+d*sin(f*x+e))**3/(a+a*sin(f*x+e)),x)

[Out]

Piecewise((-4*c**3*tan(e/2 + f*x/2)**4/(2*a*f*tan(e/2 + f*x/2)**5 + 2*a*f*tan(e/2 + f*x/2)**4 + 4*a*f*tan(e/2
+ f*x/2)**3 + 4*a*f*tan(e/2 + f*x/2)**2 + 2*a*f*tan(e/2 + f*x/2) + 2*a*f) - 8*c**3*tan(e/2 + f*x/2)**2/(2*a*f*
tan(e/2 + f*x/2)**5 + 2*a*f*tan(e/2 + f*x/2)**4 + 4*a*f*tan(e/2 + f*x/2)**3 + 4*a*f*tan(e/2 + f*x/2)**2 + 2*a*
f*tan(e/2 + f*x/2) + 2*a*f) - 4*c**3/(2*a*f*tan(e/2 + f*x/2)**5 + 2*a*f*tan(e/2 + f*x/2)**4 + 4*a*f*tan(e/2 +
f*x/2)**3 + 4*a*f*tan(e/2 + f*x/2)**2 + 2*a*f*tan(e/2 + f*x/2) + 2*a*f) + 6*c**2*d*f*x*tan(e/2 + f*x/2)**5/(2*
a*f*tan(e/2 + f*x/2)**5 + 2*a*f*tan(e/2 + f*x/2)**4 + 4*a*f*tan(e/2 + f*x/2)**3 + 4*a*f*tan(e/2 + f*x/2)**2 +
2*a*f*tan(e/2 + f*x/2) + 2*a*f) + 6*c**2*d*f*x*tan(e/2 + f*x/2)**4/(2*a*f*tan(e/2 + f*x/2)**5 + 2*a*f*tan(e/2
+ f*x/2)**4 + 4*a*f*tan(e/2 + f*x/2)**3 + 4*a*f*tan(e/2 + f*x/2)**2 + 2*a*f*tan(e/2 + f*x/2) + 2*a*f) + 12*c**
2*d*f*x*tan(e/2 + f*x/2)**3/(2*a*f*tan(e/2 + f*x/2)**5 + 2*a*f*tan(e/2 + f*x/2)**4 + 4*a*f*tan(e/2 + f*x/2)**3
 + 4*a*f*tan(e/2 + f*x/2)**2 + 2*a*f*tan(e/2 + f*x/2) + 2*a*f) + 12*c**2*d*f*x*tan(e/2 + f*x/2)**2/(2*a*f*tan(
e/2 + f*x/2)**5 + 2*a*f*tan(e/2 + f*x/2)**4 + 4*a*f*tan(e/2 + f*x/2)**3 + 4*a*f*tan(e/2 + f*x/2)**2 + 2*a*f*ta
n(e/2 + f*x/2) + 2*a*f) + 6*c**2*d*f*x*tan(e/2 + f*x/2)/(2*a*f*tan(e/2 + f*x/2)**5 + 2*a*f*tan(e/2 + f*x/2)**4
 + 4*a*f*tan(e/2 + f*x/2)**3 + 4*a*f*tan(e/2 + f*x/2)**2 + 2*a*f*tan(e/2 + f*x/2) + 2*a*f) + 6*c**2*d*f*x/(2*a
*f*tan(e/2 + f*x/2)**5 + 2*a*f*tan(e/2 + f*x/2)**4 + 4*a*f*tan(e/2 + f*x/2)**3 + 4*a*f*tan(e/2 + f*x/2)**2 + 2
*a*f*tan(e/2 + f*x/2) + 2*a*f) + 12*c**2*d*tan(e/2 + f*x/2)**4/(2*a*f*tan(e/2 + f*x/2)**5 + 2*a*f*tan(e/2 + f*
x/2)**4 + 4*a*f*tan(e/2 + f*x/2)**3 + 4*a*f*tan(e/2 + f*x/2)**2 + 2*a*f*tan(e/2 + f*x/2) + 2*a*f) + 24*c**2*d*
tan(e/2 + f*x/2)**2/(2*a*f*tan(e/2 + f*x/2)**5 + 2*a*f*tan(e/2 + f*x/2)**4 + 4*a*f*tan(e/2 + f*x/2)**3 + 4*a*f
*tan(e/2 + f*x/2)**2 + 2*a*f*tan(e/2 + f*x/2) + 2*a*f) + 12*c**2*d/(2*a*f*tan(e/2 + f*x/2)**5 + 2*a*f*tan(e/2
+ f*x/2)**4 + 4*a*f*tan(e/2 + f*x/2)**3 + 4*a*f*tan(e/2 + f*x/2)**2 + 2*a*f*tan(e/2 + f*x/2) + 2*a*f) - 6*c*d*
*2*f*x*tan(e/2 + f*x/2)**5/(2*a*f*tan(e/2 + f*x/2)**5 + 2*a*f*tan(e/2 + f*x/2)**4 + 4*a*f*tan(e/2 + f*x/2)**3
+ 4*a*f*tan(e/2 + f*x/2)**2 + 2*a*f*tan(e/2 + f*x/2) + 2*a*f) - 6*c*d**2*f*x*tan(e/2 + f*x/2)**4/(2*a*f*tan(e/
2 + f*x/2)**5 + 2*a*f*tan(e/2 + f*x/2)**4 + 4*a*f*tan(e/2 + f*x/2)**3 + 4*a*f*tan(e/2 + f*x/2)**2 + 2*a*f*tan(
e/2 + f*x/2) + 2*a*f) - 12*c*d**2*f*x*tan(e/2 + f*x/2)**3/(2*a*f*tan(e/2 + f*x/2)**5 + 2*a*f*tan(e/2 + f*x/2)*
*4 + 4*a*f*tan(e/2 + f*x/2)**3 + 4*a*f*tan(e/2 + f*x/2)**2 + 2*a*f*tan(e/2 + f*x/2) + 2*a*f) - 12*c*d**2*f*x*t
an(e/2 + f*x/2)**2/(2*a*f*tan(e/2 + f*x/2)**5 + 2*a*f*tan(e/2 + f*x/2)**4 + 4*a*f*tan(e/2 + f*x/2)**3 + 4*a*f*
tan(e/2 + f*x/2)**2 + 2*a*f*tan(e/2 + f*x/2) + 2*a*f) - 6*c*d**2*f*x*tan(e/2 + f*x/2)/(2*a*f*tan(e/2 + f*x/2)*
*5 + 2*a*f*tan(e/2 + f*x/2)**4 + 4*a*f*tan(e/2 + f*x/2)**3 + 4*a*f*tan(e/2 + f*x/2)**2 + 2*a*f*tan(e/2 + f*x/2
) + 2*a*f) - 6*c*d**2*f*x/(2*a*f*tan(e/2 + f*x/2)**5 + 2*a*f*tan(e/2 + f*x/2)**4 + 4*a*f*tan(e/2 + f*x/2)**3 +
 4*a*f*tan(e/2 + f*x/2)**2 + 2*a*f*tan(e/2 + f*x/2) + 2*a*f) - 12*c*d**2*tan(e/2 + f*x/2)**4/(2*a*f*tan(e/2 +
f*x/2)**5 + 2*a*f*tan(e/2 + f*x/2)**4 + 4*a*f*tan(e/2 + f*x/2)**3 + 4*a*f*tan(e/2 + f*x/2)**2 + 2*a*f*tan(e/2
+ f*x/2) + 2*a*f) - 12*c*d**2*tan(e/2 + f*x/2)**3/(2*a*f*tan(e/2 + f*x/2)**5 + 2*a*f*tan(e/2 + f*x/2)**4 + 4*a
*f*tan(e/2 + f*x/2)**3 + 4*a*f*tan(e/2 + f*x/2)**2 + 2*a*f*tan(e/2 + f*x/2) + 2*a*f) - 36*c*d**2*tan(e/2 + f*x
/2)**2/(2*a*f*tan(e/2 + f*x/2)**5 + 2*a*f*tan(e/2 + f*x/2)**4 + 4*a*f*tan(e/2 + f*x/2)**3 + 4*a*f*tan(e/2 + f*
x/2)**2 + 2*a*f*tan(e/2 + f*x/2) + 2*a*f) - 12*c*d**2*tan(e/2 + f*x/2)/(2*a*f*tan(e/2 + f*x/2)**5 + 2*a*f*tan(
e/2 + f*x/2)**4 + 4*a*f*tan(e/2 + f*x/2)**3 + 4*a*f*tan(e/2 + f*x/2)**2 + 2*a*f*tan(e/2 + f*x/2) + 2*a*f) - 24
*c*d**2/(2*a*f*tan(e/2 + f*x/2)**5 + 2*a*f*tan(e/2 + f*x/2)**4 + 4*a*f*tan(e/2 + f*x/2)**3 + 4*a*f*tan(e/2 + f
*x/2)**2 + 2*a*f*tan(e/2 + f*x/2) + 2*a*f) + 3*d**3*f*x*tan(e/2 + f*x/2)**5/(2*a*f*tan(e/2 + f*x/2)**5 + 2*a*f
*tan(e/2 + f*x/2)**4 + 4*a*f*tan(e/2 + f*x/2)**3 + 4*a*f*tan(e/2 + f*x/2)**2 + 2*a*f*tan(e/2 + f*x/2) + 2*a*f)
 + 3*d**3*f*x*tan(e/2 + f*x/2)**4/(2*a*f*tan(e/2 + f*x/2)**5 + 2*a*f*tan(e/2 + f*x/2)**4 + 4*a*f*tan(e/2 + f*x
/2)**3 + 4*a*f*tan(e/2 + f*x/2)**2 + 2*a*f*tan(e/2 + f*x/2) + 2*a*f) + 6*d**3*f*x*tan(e/2 + f*x/2)**3/(2*a*f*t
an(e/2 + f*x/2)**5 + 2*a*f*tan(e/2 + f*x/2)**4 + 4*a*f*tan(e/2 + f*x/2)**3 + 4*a*f*tan(e/2 + f*x/2)**2 + 2*a*f
*tan(e/2 + f*x/2) + 2*a*f) + 6*d**3*f*x*tan(e/2 + f*x/2)**2/(2*a*f*tan(e/2 + f*x/2)**5 + 2*a*f*tan(e/2 + f*x/2
)**4 + 4*a*f*tan(e/2 + f*x/2)**3 + 4*a*f*tan(e/2 + f*x/2)**2 + 2*a*f*tan(e/2 + f*x/2) + 2*a*f) + 3*d**3*f*x*ta
n(e/2 + f*x/2)/(2*a*f*tan(e/2 + f*x/2)**5 + 2*a*f*tan(e/2 + f*x/2)**4 + 4*a*f*tan(e/2 + f*x/2)**3 + 4*a*f*tan(
e/2 + f*x/2)**2 + 2*a*f*tan(e/2 + f*x/2) + 2*a*f) + 3*d**3*f*x/(2*a*f*tan(e/2 + f*x/2)**5 + 2*a*f*tan(e/2 + f*
x/2)**4 + 4*a*f*tan(e/2 + f*x/2)**3 + 4*a*f*tan...

________________________________________________________________________________________

Giac [A]
time = 0.47, size = 172, normalized size = 1.42 \begin {gather*} \frac {\frac {3 \, {\left (2 \, c^{2} d - 2 \, c d^{2} + d^{3}\right )} {\left (f x + e\right )}}{a} - \frac {4 \, {\left (c^{3} - 3 \, c^{2} d + 3 \, c d^{2} - d^{3}\right )}}{a {\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1\right )}} + \frac {2 \, {\left (d^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - 6 \, c d^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 2 \, d^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - d^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 6 \, c d^{2} + 2 \, d^{3}\right )}}{{\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 1\right )}^{2} a}}{2 \, f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c+d*sin(f*x+e))^3/(a+a*sin(f*x+e)),x, algorithm="giac")

[Out]

1/2*(3*(2*c^2*d - 2*c*d^2 + d^3)*(f*x + e)/a - 4*(c^3 - 3*c^2*d + 3*c*d^2 - d^3)/(a*(tan(1/2*f*x + 1/2*e) + 1)
) + 2*(d^3*tan(1/2*f*x + 1/2*e)^3 - 6*c*d^2*tan(1/2*f*x + 1/2*e)^2 + 2*d^3*tan(1/2*f*x + 1/2*e)^2 - d^3*tan(1/
2*f*x + 1/2*e) - 6*c*d^2 + 2*d^3)/((tan(1/2*f*x + 1/2*e)^2 + 1)^2*a))/f

________________________________________________________________________________________

Mupad [B]
time = 9.43, size = 282, normalized size = 2.33 \begin {gather*} \frac {3\,d\,\mathrm {atan}\left (\frac {3\,d\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\,\left (2\,c^2-2\,c\,d+d^2\right )}{6\,c^2\,d-6\,c\,d^2+3\,d^3}\right )\,\left (2\,c^2-2\,c\,d+d^2\right )}{a\,f}-\frac {\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\,\left (6\,c\,d^2-d^3\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4\,\left (2\,c^3-6\,c^2\,d+6\,c\,d^2-3\,d^3\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2\,\left (4\,c^3-12\,c^2\,d+18\,c\,d^2-5\,d^3\right )+12\,c\,d^2-6\,c^2\,d+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3\,\left (6\,c\,d^2-3\,d^3\right )+2\,c^3-4\,d^3}{f\,\left (a\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^5+a\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4+2\,a\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3+2\,a\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2+a\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )+a\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((c + d*sin(e + f*x))^3/(a + a*sin(e + f*x)),x)

[Out]

(3*d*atan((3*d*tan(e/2 + (f*x)/2)*(2*c^2 - 2*c*d + d^2))/(6*c^2*d - 6*c*d^2 + 3*d^3))*(2*c^2 - 2*c*d + d^2))/(
a*f) - (tan(e/2 + (f*x)/2)*(6*c*d^2 - d^3) + tan(e/2 + (f*x)/2)^4*(6*c*d^2 - 6*c^2*d + 2*c^3 - 3*d^3) + tan(e/
2 + (f*x)/2)^2*(18*c*d^2 - 12*c^2*d + 4*c^3 - 5*d^3) + 12*c*d^2 - 6*c^2*d + tan(e/2 + (f*x)/2)^3*(6*c*d^2 - 3*
d^3) + 2*c^3 - 4*d^3)/(f*(a + a*tan(e/2 + (f*x)/2) + 2*a*tan(e/2 + (f*x)/2)^2 + 2*a*tan(e/2 + (f*x)/2)^3 + a*t
an(e/2 + (f*x)/2)^4 + a*tan(e/2 + (f*x)/2)^5))

________________________________________________________________________________________